<template>
	<view>
		<view v-for="(itme,index) in url_ll" :key="index" style="margin-left:30rpx;width: 688.56rpx;height: 290rpx;background: #FFFFFF;padding:30rpx;box-sizing: border-box;margin-top: 30rpx;border-radius: 20rpx;" >
			<view>{{url_ll[0]}}</view>
			<view style="display: flex;justify-content: space-between;margin-top: 100rpx;">
				<view  style="width: 173.35rpx;height: 50.13rpx;border:1px solid #EA9936;font-size: 20.53rpx;text-align: center;line-height: 50.13rpx;border-radius: 10rpx;" >
					查看课件
				</view>
				<view style="width: 173.35rpx;height: 50.13rpx;border:1px solid #EA9936;font-size: 20.53rpx;text-align: center;line-height: 50.13rpx;border-radius: 10rpx;" @click="goto(itme)">
					预约
				</view>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		data(){
			return {
				utl_xinxi:{},
				id:"",
				user_id:"",
				url_list:"",
				url_ll:[],
				arr:[1,2,3]
			}
		},
		methods:{
			async title() {
				console.log(this.id)
				const res = await this.$myRequest({
					url:'/masterAppointment/queryOfflineSchedule',
					method:"get",
					data:{
						study_card_id:this.id,
						platform:"ios",
						type:"mechanism_offline"
					}
				})
				console.log(res,"我是数据")
			},
			goto(index){
				this.utl_xinxi.list = index[0]
				console.log(this.utl_xinxi)
				uni.navigateTo({
					url:'/pages/Friend/setRedPackets/setRedPackets?en=' + encodeURIComponent(JSON.stringify(this.utl_xinxi))
				})
			}
		},
		onLoad(option) {
			const tit = JSON.parse(decodeURIComponent(option.tit))
			this.utl_xinxi = tit
			this.id = this.utl_xinxi.studycard_id
			this.user_id = this.utl_xinxi.user_id
			this.title()
			this.url_list = this.utl_xinxi.map.masterSetPriceEntity.titile_url
			let a = []
			if(this.url_list.indexOf("#$*") == -1){
				a.push(this.url_list.split("$*"))
				this.url_ll = a
			}else{
				let b = this.url_list.split("#$*")
				let c = []
				b.forEach((itme) => {
					c.push(itme.split("$*"))
					this.url_ll = c
				})
			}
		},
		onShow() {
			this.title()
		}
	}
</script>